package com.zang.dubbospi;

import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.zang.dubbospi.service.Robot;
import org.junit.Test;

/**
 * @author Zhang Qiang
 * @Date 2019/7/18 15:02
 */
public class DubboSpiTest {

    @Test
    public void dubboSpiTest(){
        ExtensionLoader<Robot> extensionLoader = ExtensionLoader.getExtensionLoader(Robot.class);
        Robot bee = extensionLoader.getExtension("bee");
        Robot horse = extensionLoader.getExtension("horse");
        horse.say();
        bee.say();
    }

}
